function npg_struct = init_natural_policy_gradient(gamma)
%NPG_STRUCT = INIT_NATURAL_POLICY_GRADIENT(GRAD_LOG_POLICY_FUN) creates
% a new struct to hold the policy gradient data.
%
% GRAD_LOG_POLICY_FUN is a handle to a function that returns the
% gradient of the logarithm of the policy
%
% GAMMA the discount factor
%
% The return value NPG_STRUCT is a struct with the following fields:
%
% 'grad_log_policy_fun': equal to the input grad_log_policy_fun
%
% 'policy_gradient': holds the current value of the policy gradient
%                    (initally [])
% 'min_relative_change': the minimum relative change required, measured in
%                        terms of the relative change (with respect to the
%                        2-norm) of the policy gradient (default: 0.01)
% 'converged': 'true' if the latest gradient value converged given the
%              current value of 'min_relative_change', 'false' otherwise
%              (initially 'false')
% 'time_variant_baseline': 'true', if a time-variant baseline should be
%                          used, 'false' otherwise (default: 'false')
    npg_struct=struct('grad_log_policy_fun', [],...
                     'gamma', gamma,...
                     'policy_gradient', [],...
                     'min_relative_change', 0.01,...
                     'converged', false,...
                     'time_variant_baseline', false);
end